#ifndef AUXILIARY_H_
#define AUXILIARY_H_

#include "includes.h"

// returns a pointer to an array with coordenates x,y,z that represents a vector A->B
void makeVector(const double *A, const double *B, double *v);

// overloaded function
// returns n = v1 x v2, where output argument is a pointer to an array[x,y,z]
void cross(const double *v1, const double *v2, double *normal);	

// returns the scalar product of the vectors v1 and v2.
double dot(const double *v1, const double *v2);

// returns ||v|| = sqrt(v_x^2 + v_y^2 + v_z^2). vector is a pointer to an array[3]
double norm(const double *vector);

void getFCenter(pVertex v1, pVertex v2, pVertex v3, double *center);

void findVertexOpposite(pFace face, pVertex &oppositeVertex);

void DijVector(pFace face, pVertex &oppositeVertex, double *Dij);

double F_area(pFace face);

void swap(int *IJ);

void multTensorVector2D(const double *tensor, const double *vec, double *mult);

void exportCoefficients(pMesh theMesh, const int &meshDim, set<int> &setOfDomain);

#endif /*AUXILIARY_H_*/
